package com.restfinder.rate.dao;

import com.restfinder.common.dao.IRepository;
import com.restfinder.model.IEntity;
import com.restfinder.rate.model.Rate;
import com.restfinder.rate.model.RateCategory;
import com.restfinder.restaurant.model.Restaurant;
import com.restfinder.user.model.User;

public interface RateRepository extends IRepository<Rate>{

	/**
	 * Retrieves rate made by {@link User user} for {@link Restaurant restaurant}
	 * @param user
	 * @param restaurant
	 * @return
	 */
	public Rate getByUserAndRestaurant(User user, Restaurant restaurant);
	public double getAverage(Restaurant restaurant);
	public double getAverage(Restaurant restaurant, RateCategory category);
}
